function o = F1(x)
rule_num=4;
load mapminmax.mat
% data=data1(1:1141,1:6);
% data_act=data1(1:1141,7)';
% load springtrain_test_mg.mat
R1=data;
data=R1(1:1000,1:6);
data_act=R1(1:1000,7)';


oo=size(x,2);
[m,n]=size(data);  
clo=(oo/rule_num);
matrix=reshape(x(1:oo),rule_num,clo);
M1=matrix(:,1:n);
M2=matrix(:,n+1:2*n);
sigma=matrix(:,2*n+1:3*n);
c0=matrix(:,3*n+1:4*n+1);   
S=matrix(:,4*n+2:end); 
[~,~,TS_output]=tsk_type2(data,M1,M2,sigma,c0,S); 
o=sum((TS_output-data_act).^2)/size(data,1);
end